package com.chris.libs.example.pages.tabs.main.style;

import com.chris.libs.base.x.mvpp.mvpp.AbsStandardFragmentViewProxy;
import com.chris.libs.example.common.utils.FunItemUtil;
import com.chris.libs.example.pages.ext.styles.button.ButtonActivity;
import com.chris.libs.example.pages.ext.styles.edittext.EditTextActivity;

import javax.inject.Inject;

/**
 * @author Chris chan
 * Create on： 2025/2/1 15:07
 * Use for:
 * Explain:
 */
public class StyleViewProxy extends AbsStandardFragmentViewProxy implements StyleContract.UIView {
    private StyleViewModel viewModel;
    @Inject
    StyleViewHolder vh;
    @Inject
    StylePresenter presenter;

    @Inject
    public StyleViewProxy() {
    }

    @Override
    protected void init() {
        this.viewModel = getViewModel(StyleViewModel.class);
        this.vh.bind(this.contentView);
        this.presenter.bind(this);
        this.presenter.setViewModel(this.viewModel);
    }

    @Override
    protected void initView() {
        FunItemUtil.addButton(this.context, this.vh.llContainer, "Button", ButtonActivity.class);
        FunItemUtil.addButton(this.context, this.vh.llContainer, "EditText", EditTextActivity.class);
    }

    @Override
    protected void setupEvent() {
        //update(this.viewModel.getText(), this.vh.tvInfo::setText);
    }

    @Override
    protected void onReady() {
        //this.presenter.requestAndUpdate();
    }
}
